function ranks_= getValRanks(vals)% function ranks_ = getValRanks(vals)%% given a list of vals, returns a list of% their ranks%suniqs = sort(unique(vals));%%ranks_ = nans(size(vals));%%for i = 1:size(suniqs,1)%  %  ranks_(vals==suniqs(i)) = i;%%end%% doin' it by hand...ranks_ = nans(size(vals));ranks_(vals==0)   = 1;ranks_(vals==32)  = 2;ranks_(vals==64)  = 3;ranks_(vals==128) = 4;ranks_(vals==256) = 5;ranks_(vals==512) = 6;